package com.jali.crud.controller;

import com.jali.crud.bean.Msg;
import com.jali.crud.service.JaUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author jali
 * @create 2019-01-23 14:53
 */
@Controller
public class JaUserController {

    @Autowired
    JaUserService jaUserService;

    /**
     * 获取用户的积分
     * @return
     */
    @RequestMapping(value = "/getMyScore",method = RequestMethod.GET)
    @ResponseBody
    public Msg getMyScore(){
        return Msg.success().add("score",jaUserService.getScoreByUserId("1"));
    }
}
